location /path {
  include        fastcgi_params;
  fastcgi_pass   unix:/run/fcgiwrap.sock;
  fastcgi_param  SCRIPT_FILENAME /path/to/file.cgi;
  fastcgi_param  DOCUMENT_ROOT /path/to;
  fastcgi_param  RANDOM_VAR random_val;
  fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
